import torch
import torch.nn as nn


def loss_function(f, y):
    loss = (f - y).pow(2)
    return loss


class LinearModel(nn.Module):
    def __init__(self, D_in, D_out):
        super(LinearModel, self).__init__()
        self.hidden = nn.Linear(D_in, 32)
        self.relu = nn.ReLU()
        self.output = nn.Linear(32, D_out)

    def forward(self, x):
        x = self.hidden(x)
        x = self.relu(x)
        x = self.output(x)
        return x



